import { report } from '@/api/report'

export enum REPORT_EVENT_NAME {
  ORIGIN_README = 'origin-readme',
  AIGC_README = 'aigc-readme',
  CHAT_TTS = 'chat-tts',
}

export function useReport(eventID: string, eventParams: object, headers?: object) {
  // 百度pv手动上报
  // if (eventID === 'pageview' && window._hmt) {
  //   const path = window.location.pathname + window.location.search
  //   window._hmt.push(['_trackPageview', path])
  // }
  return report(eventID, eventParams, headers)
}
